﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc.Html;
using TjZheng.Framework;
using System.Web.Mvc;

namespace TjZheng.EasyUI
{
    public static partial class EasyUIExtension
    {
        /// <summary>
        /// EasyUI文本框，验证字符串
        /// </summary>
        /// <param name="htmlHelper"></param>
        /// <param name="name">input的name属性</param>
        /// <param name="value">input的value属性</param>
        /// <param name="isRequired">是否必输</param>
        /// <param name="missingMessage">空值提示信息</param>
        /// <param name="htmlAttributes">html属性</param>
        /// <param name="validTypes">EasyUI提供的验证类型或扩展类型</param>
        /// <returns></returns>
        public static MvcHtmlString StringBox(this HtmlHelper htmlHelper, string name, object value, bool isRequired, string missingMessage, object htmlAttributes = null, params string[] validTypes)
        {
            return htmlHelper.TextBox("easyui-validatebox textbox", name, value, isRequired, missingMessage, htmlAttributes, validTypes);
        }
    }
}
